package com.kun.util;

import cn.hutool.core.util.IdUtil;

/**
 * @className: SnowUtil
 * @Description: ...
 * @author: kunkun
 * @date: 2025/7/10 16:59
 */
public class SnowUtil {
    private static long dataCenterId =1 ;//数据中心
    private static long wokerId =1 ;//机器id

    public static long getSnowflakeNextId(){
        return IdUtil.getSnowflake(wokerId,dataCenterId).nextId();
    }
    public static String getSnowflakeNextIdStr(){
        return IdUtil.getSnowflake(wokerId,dataCenterId).nextIdStr();
    }

 }
